You identified the first trigger - if the patiant Medicare or not. Most practices if they have a large percentage of Medicare patients will have both the CPT and HCPCS code on their superbills/encounter forms. If Medicare patient you choose the HCPCS code.
Of course the codes are exactly the same or else there wouldn't be the need for the HCPCS code alternative. There is someting in the CPT description that CMS doesn't agree to pay for so they create a code in HCPCS to signify what they do cover.